package com.buss.customer.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.buss.core.persistence.ResultList;
import com.buss.customer.dao.CustomerContactsDao;
import com.buss.customer.model.CustomerContacts;
import com.buss.customer.service.CustomerContactsService;

@Service
public class CustomerContactsServiceImpl implements CustomerContactsService {

	@Autowired
	private CustomerContactsDao contactsDao;
	
	@Override
	public CustomerContacts saveContacts(CustomerContacts contacts) {
		return contactsDao.saveContacts(contacts);
	}

	@Override
	public void editContacts(CustomerContacts contacts) {
		contactsDao.editContacts(contacts);
	}

	@Override
	public void removeContacts(Long[] ids) {
		contactsDao.removeContacts(ids);
	}

	@Override
	public CustomerContacts loadContacts(Long id) {
		return contactsDao.loadContacts(id);
	}

	@Override
	public ResultList<CustomerContacts> queryContacts(Long customerId,
			String name) {
		return contactsDao.queryContacts(customerId, name);
	}

	public static void main(String[] args){
		double d = 68.00;
		Long amount = ((Double)(d * 100)).longValue() ;
		System.out.println(amount);
		
	}
}
